<?php
/**
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       Cake.View.Layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */

$cakeDescription = __d('cake_dev', 'SIGEM: Sistema de Gerenciamento de Empréstimos');
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<?php echo $this->Html->charset(); ?>
	<title>
		<?php echo $cakeDescription ?>:
		<?php echo $title_for_layout; ?>
	</title>
	<?php
		echo $this->Html->meta("viewport", "width=device-width, initial-scale=1.0");
		echo $this->Html->meta("description", "Sistema de Gerenciamento de Empréstimos de Bens Materiais");
		echo $this->Html->meta("author", "Diovane Monteiro, Renan Reis, Kathlen Brun, Marcos Pessoa");
		echo $this->Html->meta('icon');

     	echo $this->Html->css('bootstrap');
		echo $this->Html->css('bootstrap-responsive');
		echo $this->Html->css('font-awesome/font-awesome2');
		echo $this->Html->css('bootstrap-custom');
		echo $this->Html->css('bootstrap-responsive-custom');
		echo $this->Html->css('jquery-ui/base/jquery-ui');
		//echo $this->Html->css('jquery-ui/smoothness/jquery-ui');
		echo $this->Html->css('sidep');
		echo $this->Html->css('accordionmenu');
		echo $this->Html->css('coin-slider-styles');
		echo $this->Html->css('slide');
		
		
		// echo $this->Html->css('style');
				
		echo $this->Html->script('jquery');
		echo $this->Html->script('jquery-ui');
		echo $this->Html->script('coin-slider.min');
		echo $this->Html->script('slide');
		echo $this->Html->script('sdmenu');
				
		echo $this->fetch('meta');
		echo $this->fetch('css');
		echo $this->fetch('script');
		
	?>
	
	<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
	<!--[if lt IE 9]>
	<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->
	
</head>
<body>
	  
  <div class="navbar navbar-inverse navbar-fixed-top">
      <div class="navbar-inner">
      <div class="container-fluid">
      	        	  
      	  <!-- Panel -->
<div id="toppanel">
	<div id="panel">
		<div class="content clearfix">
			
			<div class="left">				
				<center>
					<?php echo $this->Html->image('logo-ufam.png', array('alt' => "Ufam"))?>
				</center>
			</div>
		
			<div class="left">
				<center>
					<?php echo $this->Html->image('logos_icomp.png', array('alt' => "Ufam"))?>				
				</center>	
			</div>
			<div class="left">
				<!-- Login Form -->
				<form class="clearfix" action="#" method="post">
				</form>
			</div>
			<div class="left right">			
				<!-- Register Form -->
						
				<?php echo $this->Form->create('Usuario'); ?>
					<h1>Logar</h1>
					<?php echo $this->Form->Label('login', 'Login:', array('class' => 'grey'));	?>	
					<?php echo $this->Form->input('login', array('type' => 'text', 'label' => false, 'div' => false, 'class' => 'field'));	?>			
					<?php echo $this->Form->Label('password', 'Senha:', array('class' => 'grey'));	?>	
					<?php echo $this->Form->input('password', array('label' => false, 'div' => false, 'class' => 'field'));	?>
					<?php echo $this->Form->submit(__('Login'), array('div' => false, 'class' => 'bt_login')); 	?>								
				<?php echo $this->Form->end(null); ?>
			</div>
		</div>
</div> <!-- /login -->	

	<!-- The tab on top -->	
	<div class="tab">
		<ul class="login">
			<li class="left">&nbsp;</li>
			<li style="padding-top: 11px;">
			<?php 
			if ($this->Session->check('Auth.User')){
				echo "Olá ". $this->Session->read('Auth.User.nome');
				
			}else{
				echo "Ola Visitante!"; 
			}
			?>
			
			</li>
			<li id="toggle2">
			<?php 
			if ($this->Session->check('Auth.User')){
				
			 echo $this->Html->link('Trocar Senha', array('controller' => 'usuarios', 'action' => 'changepass', $this->Session->read('Auth.User.id')), array('class'=>"edit"));			
			}
			?>
			
			</li>
			<?php if ($this->Session->check('Auth.User')):?>
				<li id="toggle">
				<?php echo $this->Html->link('Logout', array('controller' => 'usuarios', 'action' => 'logout'), array('class'=>"off"));?>
					</li>
			<?php else:?>
				<li class="sep" style="padding-top: 11px;">|</li>
				<li id="toggle">
					<a id="open" class="open" href="#">Log In</a>
					<a id="close" class="close" style="display: none;"  href="#">Close</a>			
				</li>
			<?php endif;?>
			<li class="right">&nbsp;</li>
		</ul> 
	</div> <!-- / top -->
	
</div> 
        
        </div>
       </div>
    </div>
    
    <header class="jumbotron subhead">
	  <div class="container-fluid">
	    <h2><?php echo $this->Html->image('../app/webroot/img/logo-ufam.png', array('height' => 60, 'width' => 60));?> SIGEM - Sistema de Gerenciamento de Empréstimos de Equipamentos</h2>
	    <!-- <p class="lead">Dozens of reusable components built to provide navigation, alerts, popovers, and more.</p> -->
	  </div>
	</header>
    
    <div class="container-fluid">
      <div class="row-fluid">
		<div class="span2">
          
		<div id="wrapper-250">

		<ul class="accordion">
			
			<li id="one" class="files">

				<a class="active" href="#one">Administração</a>

				<ul style="display: block;" class="sub-menu">
					<li><?php echo $this->Html->link('Usuários', array('controller' => 'usuarios', 'action' => 'index'))?></li>
					<li><?php echo $this->Html->link('Perfis', array('controller' => 'perfils', 'action' => 'index'))?></li>
					<li><?php echo $this->Html->link('Categorias', array('controller' => 'categorias', 'action' => 'index'))?></li>
					<li><?php echo $this->Html->link('Localização', array('controller' => 'localizacaos', 'action' => 'index'))?></li>
					<li><?php echo $this->Html->link('Alunos', array('controller' => 'alunos', 'action' => 'index'))?></li>					
					<li><?php echo $this->Html->link('Projetos', array('controller' => 'projetos', 'action' => 'index'))?></li>
					<li><?php echo $this->Html->link('Equipamentos', array('controller' => 'equipamentos', 'action' => 'index'))?></li>  				
				</ul>

			</li>
			
			<li id="two" class="mail">
				<a class="" href="#two">Movimentação</a>
				<ul style="display: none;" class="sub-menu">
					<li><?php echo $this->Html->link('Empréstimos', array('controller' => 'emprestimos', 'action' => 'index'))?></li>
				</ul>
			</li>
			
			<li id="three" class="cloud">
				<a class="" href="#three">Relatórios</a>
				<ul style="display: none;" class="sub-menu">					
					<li><a href="#">Empréstimos</a></li>					
				</ul>
			</li>
		</ul>
		
	</div>
		</div>
      	<div class="span10">	
			<?php echo $this->Session->flash('auth'); ?>
			<?php echo $this->Session->flash('flash', array('element' => 'messageInfo')); ?>
			<?php echo $this->fetch('content'); ?>
		</div>

      </div><!--/row-->
      
      <hr/>
      <footer>

        <div class="navbar navbar-inverse">
      <div class="navbar-inner">
  
      <center> <b> <p style="padding-top: 10px;"> SIGEM 2.0 <br/> &copy; ICOMP - Instituto de Computação 2013 <br /> Todos os direitos reservados </p> </b> </center>

        </div>
           </div>
      
      </footer>
      
    </div><!--/.fluid-container-->
    
    <div id="ajax-indicator" class="hide">
    	Processando...			
    </div>
    
    <?php 
    
    echo $this->Html->script('bootstrap'); 
  
  // echo $this->Html->script('../app/webroot/js/bootstrap'); 
   
     ?> 

	<?php echo $this->Js->writeBuffer();?>
	
	<?php echo $this->element('sql_dump'); ?>

</body>
</html>
